Online remount btrfs of root filesystem with different subvolume (snapshot) [migrated]
Posted
by
goncalopp
on Server Fault
See other posts from Server Fault
or by goncalopp
Published on 2012-11-11T03:18:05Z
Indexed on
2012/11/11
5:04 UTC
Read the original article
Hit count: 479
Let's say you have a btrfs root filesystem on an online system. You want to revert the filesystem to an earlier state, of which you have a snapshot:
remount /dev/sdaX / -o remount,subvol=snapshots/Y
For the record, I've done this in a test system, and it does not work. The command returns with no errors, but the subvolume mounted is the same.
If this did work, what would be the consequences? My guess is that open file descriptors would still point to the old subvolume, thus possibly leading to "data loss" on the new subvolume, if one was not careful. Assuming one goes to the trouble of closing and reopening all open file descriptors, does this sound feasible? Or are there other types of problems?
© Server Fault or respective owner